#ifndef __AKY_VOICE_H__
#define __AKY_VOICE_H__
#include "aky_program/aky_define.h"
typedef enum
{
    START_UP = 0,//常用宣医通，心脑更健康
    MEASURE_BEGIN,//测量开始，请勿移动或说话
    WAKE_IAM,//唤醒回复 我在
    ACCORD_WHO_STAND,//根据世界卫生组织标准，您的本次血压
    MEASURE_COMPLET,//测量结束
    NORMAL,//正常
    LEFT_SIDE,//您的左侧
    RIGHT_SIDE,//右侧
    ON_HIGH_SIDE,//偏高
    ON_LOW_SIDE,//偏低
    PLS_REMEASURE_OR_MEDICAL_ATTENT,//请重新测量或就医

    UNIT_SYS,//高压
    UNIT_DIA,//低压
    PULSE,//脉率
    ZERO,//零
     ONE,
    TWO,
    THREE,
    FOUR,
    FIVE,
    SIX,
    SEVEN,
    EIGHT,
    NINE,
   TEN,//十
   HUNDRED,//百
   VOICE_CMD_POINT,//点
   TIME,//次
   MMHG,//毫米汞柱
   KPA,//千帕
    VIOCE_LOW_BAT, //低电压
    PREADAP_START,//训练开始，请保持静止状态，切勿乱动，以免影响训练效果
    PREADAP_END,//训练完毕，
    VOICE_RETEST_BP,//请保持安静，倒计时结束后将为您再次测量血压
    DATA_SENDING,//数据正在储存，请勿操作
    DATA_SEND_SUCC,//数据上传成功
    DATA_SEND_ERR,//数据上传失败

    TRAIN_GREAT,//本次训练非常棒，再接再厉，继续保持
    TRAIN_GOOD,//本次训练很好，训练时保持静止状态，效果更佳，请继续努力
    TRAIN_AVERAGE,//本次训练一般，养成规律训练习惯，效果更佳，请继续努力
    BP_HIGH_SEEK_MEDICAL_ATTENTION_FAST,//您血压偏高，请尽快就医

    BG_1,//训练时背景音乐
    BG_2,
    BG_3,
    VOICE_MAX,
} e_aky_voice_t;
typedef enum  
{
    INNER_VOICE_PRES_UNIT_MMG = 0,
    INNER_VOICE_PRES_UNIT_KPA,
    INNER_VOICE_PRES_UNIT_HEARTBEAT, 

}e_inner_voice_pres_unit_t;


typedef struct 
{
    uint8_t inner_voice_cmd_number_offset;//零
    uint8_t inner_voice_cmd_ten;//十
    uint8_t inner_voice_cmd_Twenty;//二十
    uint8_t inner_voice_cmd_hundred;//百
    uint8_t inner_voice_cmd_time;//次
    uint8_t inner_voice_cmd_spot;//点

    uint8_t inner_voice_cmd_mm_hg;//毫米汞柱
    uint8_t inner_voice_cmd_kilopascal;//千帕
}stru_inner_voice_cmd_regist_t;

typedef enum
{
    VOICE_STAT_IDLE,
    VOICE_STAT_PLAY_BG,
    VOICE_STAT_PLAY_SINGLE,
    VOICE_STAT_PLAY_ARRAY,

}e_voice_play_stat_t;


typedef enum
{
    INFO_IDLE = 0,
    INFO_PLAY_SINGLE,
    INFO_PLAY_ARRAY,

}e_voice_play_info_t;
typedef struct 
{
    e_voice_play_info_t e_voice_play_sub_info;
    uint8_t voice_index;
}s_voice_play_info_t;


void voice_stop(void);
uint8_t get_voice_level(uint16_t val);
void aky_voice_table_play(e_aky_voice_t index);
void my_wav_completed_cb(wav_obj_t* wav_obj, void* user_data);
void stop_harware_dac(void);
void voice_play_single(e_aky_voice_t index);
void clr_voice_play_info(void);
void voice_play_array(void);
void voice_play_stat_pro(void);
void combbine_test(void);
void voice_init(void);
void inner_voice_combine_cmd(e_inner_voice_pres_unit_t e_pres_unit, uint8_t sys, uint8_t dia,uint8_t sys_right,uint8_t dia_right, uint8_t pul);
void inner_voice_who(uint8_t wholevel);
void voice_enter_bg_play(void);
void voice_exit_bg_play(void);
uint8_t get_voice_busy_stat(void);
void my_dac_open(void);
uint16_t get_video_voice_val(uint8_t level);
void my_dac_mute(void);

#endif //__BOOTSCREEN_H__